<{include file="public/admin_header" /}>
<style type="text/css">
    .layui-form-item{margin-bottom:0;}
    .layui-elem-quote{padding: 3px 15px;}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top:0;">
    <legend><{$MenuName}>列表</legend>
</fieldset>
<blockquote class="layui-elem-quote">
    <div class="layui-form layui-form-pane">
        <form action="<{:url('index')}>" method="get">
            <div class="layui-form-item">
                <label class="layui-form-label" style="width: 80px;">媒体平台</label>
                <div class="layui-input-inline" style="width: 130px;">
                    <select name="MediaWebNameID">
                        <option value="0">媒体平台选择</option>
                        <{volist name="MediaWebNameID" id="val"}>
                        <option value="<{$val.TypeID}>" <{if condition="!empty($UrlParam.MediaWebNameID) && $UrlParam.MediaWebNameID eq $val.TypeID"}>selected<{/if}>><{$val.TypeName}></option>
                        <{/volist}>
                    </select>
                </div>
                <label class="layui-form-label" style="width: 80px;">行业分类</label>
                <div class="layui-input-inline" style="width: 130px;">
                    <select name="MediaIndustryID">
                        <option value="0">行业分类选择</option>
                        <{volist name="MediaIndustryID" id="val"}>
                        <option value="<{$val.TypeID}>" <{if condition="!empty($UrlParam.MediaIndustryID) && $UrlParam.MediaIndustryID eq $val.TypeID"}>selected<{/if}>><{$val.TypeName}></option>
                        <{/volist}>
                    </select>
                </div>
                <label class="layui-form-label" style="width: 80px;">媒体地区</label>
                <div class="layui-input-inline" style="width: 130px;">
                    <select name="MediaCityID">
                        <option value="0">媒体地区选择</option>
                        <{volist name="MediaCityID" id="val"}>
                        <option value="<{$val.TypeID}>" <{if condition="!empty($UrlParam.MediaCityID) && $UrlParam.MediaCityID eq $val.TypeID"}>selected<{/if}>><{$val.TypeName}></option>
                        <{/volist}>
                    </select>
                </div>
                <label class="layui-form-label" style="width: 80px;">关键字</label>
                <div class="layui-input-inline" style="width: 130px;">
                    <input type="text" name="keyword" placeholder="请输入关键字" value="<{$UrlParam.keyword|default=''}>" class="layui-input" />
                </div>
                <button class="layui-btn search" type="submit">搜索</button>
            </div>
        </form>
    </div>
</blockquote>
<form class="layui-form" id="MyForm" method="post">
    <div class="page-module-table">
        <table class="layui-table">
            <thead>
            <tr>
                <th width="60" class="listtitle">
                    <input lay-skin="primary" lay-filter="AllSelectBox" type='checkbox'>
                </th>
                <th width="120" class="listtitle">媒体平台</th>
                <th class="listtitle">行业分类</th>
                <th class="listtitle">媒体地区</th>
                <th class="listtitle">媒体名称</th>
                <th class="listtitle">平台价格</th>
                <th class="listtitle">游客价格</th>
                <th class="listtitle">大侠价格</th>
                <th class="listtitle">掌门价格</th>
                <th class="listtitle">盟主价格</th>
                <th width="100" class="listtitle">状态</th>
				<th width="100" class="listtitle">推荐</th>
				<th width="100" class="listtitle">创建时间</th>
                <th width="100" class="listtitle">操作</th>
            </tr>
            </thead>
            <tbody>
            <{volist name="List" id="val"}>
            <tr>
                <td align="center">
                    <input type="checkbox" name="Del[]" lay-skin="primary" lay-filter="ItemBox" value="<{$val.MediaID}>" />
                </td>
                <td align="center"><{$val.MediaWebNameID.New}></td>
                <td align="center"><{$val.MediaIndustryID.New}></td>
                <td align="center"><{$val.MediaCityID.New}></td>
                <td align="center"><{$val.MediaTitle}></td>
                <td align="center"><{$val.MediaWebPrice}></td>
                <td align="center"><{$val.MediaMemberPrice1}></td>
                <td align="center"><{$val.MediaMemberPrice2}></td>
                <td align="center"><{$val.MediaMemberPrice3}></td>
                <td align="center"><{$val.MediaMemberPrice4}></td>
                <td align="center">

				<{if condition="$val['MediaState'] eq 3"}>
				<font style="color:red; font-size:12px;">审核未通过</font>
				<{elseif condition="$val['MediaState'] eq 2 || $val['MediaState'] eq 1"}>
                 <input type="checkbox" <{if condition="$val['MediaState'] eq 1"}>checked<{/if}> name="MediaState" lay-skin="switch" Url="<{:url('ajax/ListStateChange')}>" TableName="wemedia" MainFieldID="MediaID" ChangeField="MediaState" ID="<{$val.MediaID}>" lay-filter="State" lay-text="已用|未用">
				<{elseif condition="$val['MediaState'] eq 0"}>				
				<font style="color:red; font-size:12px;">客户已删</font>
				<{/if}>
                </td>
				 <td align="center">
                    <input type="checkbox" <{if condition="$val['Recommend'] eq 1"}>checked<{/if}> name="Recommend" lay-skin="switch" Url="<{:url('ajax/ListStateChange')}>" TableName="wemedia" MainFieldID="MediaID" ChangeField="Recommend" ID="<{$val.MediaID}>" lay-filter="State" lay-text="已推|未推">
                </td>
				 <td align="center">
                    <{$val.MediaTime}>
                </td>
                <td align="center">
                    <div class="layui-btn-group">
                        <a class="layui-btn layui-btn-mini" href="<{:url('edit',array('id'=>$val['MediaID']))}>"><i class="layui-icon"></i>编辑</a>
                    </div>
                </td>
            </tr>
            <{/volist}>
            </tbody>
        </table>
    </div>
    <div class="layui-form layui-form-pane" style="margin-top: 10px;">
        <div class="layui-form-item" style="float: left;">
            <div class="layui-input-inline">
                <select id="OperationType">
                    <option value="0">请选择...</option>
                    <option value="Del" url="<{:url('del')}>">批量删除</option>
                </select>
            </div>
            <button class="layui-btn search" type="button" onclick="ExecuteCheck();">执行</button>
        </div>
        <div class="layui-box layui-laypage layui-laypage-default" style="float:right; margin: 0;">
            <{$List->render()}>
        </div>
        <div class="clear"></div>
    </div>
</form>
<{include file="public/admin_footer"}>